package com.exercise.DesignPattern.BehavioralPatterns.ChainOfResponsibilityPattern;

//具体处理B
public class ConcreteHandlerB extends Handler{
    @Override
    public void handleRequest(String request) {
        if (request.equals("B")) {
            System.out.println("Handler B handling request B");
        } else if (nextHandler != null) {
            nextHandler.handleRequest(request);
        }
    }
}
